<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>后台管理系统</title>
    <link rel="stylesheet" href="/static/admin/layui/css/layui.css">
    <link rel="stylesheet" href="/static/admin/css/common.css">
    <style>



    </style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
   {include file="common/top"}
    {include file="common/left"}
</div>
<div class="main-container">
    <!-- 面包屑 -->
    <!-- lay-separator="-" -->
    <span class="layui-breadcrumb" lay-separator="-">
        <a href="/admin/index/index">首页</a>
        <a href="###">分类列表</a>
        </span>
    <!-- <div style="margin-top: 10px;">
        <button type="button" class="layui-btn">
            <a href="add"><i class="layui-icon">&#xe608;</i> 添加</a>
        </button>
    </div> -->
    <table class="layui-table" style="margin-top: 10px">
        <thead>
        <th>ID</th>
        <th>分类名称</th>
        <th>操作</th>
        </thead>
        <tbody>
        {volist name="$cateres" id="cate"}
        <tr>
            <td>{$cate.id}</td>
            <td>{$cate.level|rep_str} {$cate.cate_name}</td>
            <td>{if $cate.pid ==0}<a href="add?id={$cate.id}" class="layui-btn">添加子类</a>{else}<a href="http://www.layui.com" class="layui-btn layui-btn-disabled">添加子类</a>{/if}<a href="edit?id={$cate.id}" class="layui-btn layui-bg-blue">编辑</a> 
                {if $cate.id==1||$cate.id==2||$cate.id==11} <a href="###" class="layui-btn layui-btn-disabled"  ><i class="layui-icon layui-icon-delete"></i>删除</a>  {else} <a href="del?id={$cate.id}" class="layui-btn layui-bg-red" onclick="return confirm('你确定要删除这个分类吗')" ><i class="layui-icon layui-icon-delete"></i>删除</a> {/if}</td>
        </tr>
        {/volist}
        </tbody>
    </table>
</div>
</body>
<script src="/static/admin/layui/layui.js"></script>
<script>
    layui.use(['element'],() =>{
    });
    
</script>
<!-- <script src="../layui/layui.all.js"></script>
<script>
    window.onload = () => {
        layui.layer.msg('Hello Layui!');
    }
</script> -->
</html>